package com.fmsz.xmly.fragments.downloadfgts;


import android.content.Intent;
import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v4.app.Fragment;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.Button;

import com.fmsz.xmly.R;
import com.fmsz.xmly.activitys.downloadactivity.HotRecommendActivity;

/**
 * A simple {@link Fragment} subclass.
 */
public class BaseDownloadFragment extends Fragment implements View.OnClickListener {


    public BaseDownloadFragment() {
        // Required empty public constructor
    }

    public static BaseDownloadFragment newInstance() {
        
        Bundle args = new Bundle();
        BaseDownloadFragment fragment = new BaseDownloadFragment();
        fragment.setArguments(args);
        return fragment;
    }


    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container,
                             Bundle savedInstanceState) {
        // Inflate the layout for this fragment
        return inflater.inflate(R.layout.fragment_base_download, container, false);
    }

    @Override
    public void onViewCreated(View view, @Nullable Bundle savedInstanceState) {
        super.onViewCreated(view, savedInstanceState);
        Button button = (Button) view.findViewById(R.id.button_look);
        button.setOnClickListener(this);
    }

    //去看看按钮
    @Override
    public void onClick(View v) {
        Intent intent=new Intent(getContext(), HotRecommendActivity.class);
        startActivity(intent);
        getActivity().overridePendingTransition(R.anim.slide_in_left, R.anim.leave_in_left);

    }
}
